home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2007 March
/
PCWorld_2007-03_cd.bin
/
komunikace
/
acehtml
/
acehtmlfreeware.exe
/
scriptdef
/
Power Equivalents.sd
< prev
next >
Wrap
INI File
|
2006-09-13
|
7KB
|
259 lines
[SUBJECT]
Description=Converts bewteen different units of power
ImageIndex=-1
Folder=Mathematics
[BODY_TEXT]
;<!-- Cut-N-Paste JavaScript from ISN Toolbox
;Copyright 1996, Infohiway Server Network. Restricted use is hereby
;granted (both personal and commercial use OK so long as this code is
;not *directly* sold), providing this notice is buried somewhere deep
;in your HTML document. A link to http://www.infohiway.com is always
;appreciated, but is absolutely and positively not necessary. :-) -->
;
;<script language="JavaScript">
;
;<!-- Hide JavaScript from Java-Impaired Browsers
;
;function initArray() {
;
; this.length = initArray.arguments.length;
;
; for (var i = 0; i < this.length; i++) {
;
; this[i] = initArray.arguments[i];
;
; }
;
; }
;
;/* Please don't ask about this work-around. It works... We're sure arrays
;
; will be better supported soon. */
;
;var isn11 = new initArray("4b","5b","8b","8b");
;
;isn11[0] = "~01~10.7457~21.014~30.7604~476.04~5550~60.1781~70.7068~8";
;
;isn11[1] = "~01.3410~11~21.360~31.020~4102.0~5737.6~60.2388~70.9478~8";
;
;isn11[2] = "~00.9863~10.7355~21~30.75~475~5542.5~60.1757~70.6971~8";
;
;isn11[3] = "~01.315~10.9807~21.333~31~4100~5723.3~60.2342~70.9295~8";
;
;isn11[4] = "~00.01315~10.009807~20.01333~30.01~41~57.233~60.002342~70.009295~8";
;
;isn11[5] = "~00.00181818~10.001356~20.00184~30.00138~40.1383~51~60.0003238~70.001285~8";
;
;isn11[6] = "~05.615~14.187~25.692~34.269~4426.9~53088~61~73.968~8";
;
;isn11[7] = "~01.415~11.055~21.434~31.076~4107.6~5778.2~60.2520~71~8";
;
;
;
;
;
;function powerCon() {
;
; // First, get the variables checked by the user
;
; for (var i = 0; i < 8; i++) {
;
; if (document.isnform11.poweri[i].checked) {
;
; powi = i;
;
; powinm = document.isnform11.poweri[i].value;
;
; }
;
; }
;
; for (var i = 0; i < 8; i++) {
;
; if (document.isnform11.powero[i].checked) {
;
; powo = i;
;
; powonm = document.isnform11.powero[i].value;
;
; }
;
; }
;
; // Now grab the number input by user and parse to be sure numeric
;
; useri = document.isnform11.powerin.value;
;
; mulstr = isn11[powi];
;
; picker = "~" + powo;
;
; ps = mulstr.indexOf(picker);
;
; powo++;
;
; picker = "~" + powo;
;
; ps1 = mulstr.indexOf(picker);
;
; mulstr = mulstr.substring((ps + 2),ps1);
;
; ps = (useri * mulstr);
;
; picker = "";
;
; picker += ps;
;
; ps1 = picker.indexOf(".");
;
; if (ps1 > -1) {
;
; // Correct for binary/floating point conversion error
;
; ps = ps + .000001;
;
; picker = "";
;
; picker += ps;
;
; ps2 = picker.indexOf("e");
;
; if (ps2 < 0) {
;
; picker = picker.substring(0,(ps1 + 6));
;
; }
;
; if (ps2 == 0 || ps2 > 0) {
;
; ps3 = picker.indexOf("00000");
;
; if (ps3 > 0) {
;
; picker = picker.substring(0,ps3 + 1) + picker.substring(ps2,picker.length);
;
; }
;
; }
;
; }
;
; picker = useri + " " + powinm + " = " + picker + " " + powonm;
;
; document.isnform11.powerout.value = picker;
;
; }
;
;// End Hiding -->
;
;
;
;</script>
;<form name="isnform11">
;<table border="1" width="486" summary="">
;
;<tr><td colspan="9" align="center"><font
;
;color="blue"><b>`Caption`</b></font></td></tr>
;
;<tr><td colspan="9" valign="top"><font size="1"><B>Type the number
;
;you wish converted here: </B>
;
;<input type="text" name="powerin" size="30" value=""
;
;onChange="powerCon();"><br><b>Then click radio buttons for desired
;
;conversion:</font></B></td></tr>
;
;<tr><td align="center"><font color="red" size="1"><b>From:</b></font></td>
;
;<td align="center" valign="top"><font size="1">Hp<br><input type="radio"
;
;name="poweri" value="Hp" checked onClick = ""></font></TD>
;
;<td align="center" valign="top"><font size="1">Metric hp<br><input
;
;type="radio" name="poweri" value="Metric hp" onClick = ""></font></TD>
;
;<td align="center" valign="top"><font size="1">Kw<br><input type="radio"
;
;name="poweri" value="Kw" onClick = ""></font></TD>
;
;<td align="center" valign="top"><font size="1">Poncelets<br><input
;
;type="radio" name="poweri" value="Poncelets" onClick = ""></font></TD>
;
;<td align="center" valign="top"><font size="1">Kg-m/sec<br><input
;
;type="radio" name="poweri" value="Kg-m/sec" onClick = ""></font></TD>
;
;<td align="center" valign="top"><font size="1">Ft-lb/sec<br><input
;
;type="radio" name="poweri" value="Ft-lb/sec" onClick = ""></font></TD>
;
;<td align="center" valign="top"><font size="1">Kcal/sec<br><input
;
;type="radio" name="poweri" value="Kcal/sec" onClick = ""></font></TD>
;
;<td align="center" valign="top"><font size="1">Btu/sec<br><input
;
;type="radio" name="poweri" value="Btu/sec" onClick = ""></font></TD></tr>
;
;<tr><td align="center"><font color="red" size="1"><b>To:</b></font></TD>
;
;<td align="center" valign="top"><font size="1">Hp<br><input
;
;type="radio" name="powero" value="Hp" onClick = ""></font></TD>
;
;<td align="center" valign="top"><font size="1">Metric Hp<br><input
;
;type="radio" name="powero" value="Metric Hp" onClick = ""></font></TD>
;
;<td align="center" valign="top"><font size="1">Kw<br><input
;
;type="radio" name="powero" value="Kw" onClick = ""></font></TD>
;
;<td align="center" valign="top"><font size="1">Poncelets<br><input
;
;type="radio" name="powero" value="Poncelets" onClick = ""></font></TD>
;
;<td align="center" valign="top"><font size="1">Kg-m/sec<br><input
;
;type="radio" name="powero" value="Kg-m/sec" onClick = ""></font></TD>
;
;<td align="center" valign="top"><font size="1">Ft-lb/sec<br><input
;
;type="radio" name="powero" value="Ft-lb/sec" checked onClick = ""></font></TD>
;
;<td align="center" valign="top"><font size="1">Kcal/sec<br><input
;
;type="radio" name="powero" value="Kcal/sec" onClick = ""></font></TD>
;
;<td align="center" valign="top"><font size="1">Btu/sec<br><input
;
;type="radio" name="powero" value="Btu/sec" onClick = ""></font></TD></tr>
;
;<tr><td colspan="9" valign="top"><font size="1"><input type="button"
;
;value=" Click for Conversion " onClick="powerCon();"><input
;
;type="reset" value=" reset values "><input type="text"
;
;name="powerout" size="30" VALUE="" onClick="powerCon();">
;
;</font></td></tr>
;
;</table></form>
;
;<p>
;
[`Caption`]
Kind=S
Value=Power Equivalents